package com.xyz.controller;

import com.xyz.entity.Girl;
import com.xyz.service.GirlService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by sunny on 2016/12/20.
 */
@RestController
@RequestMapping("girl")
public class GirlController {
    @Autowired
    private GirlService girlService;

    @GetMapping(value = "/girls")
    public List<Girl> girlList() {
        return girlService.getGirlList();
    }
}
